package com.wdhcr.osspolicy.config;

import com.aliyun.oss.OSSClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OssConfig {


    @Autowired
    private OssProperties ossProperties;


    @Bean
    public OSSClient initOss() {
        return  new OSSClient(ossProperties.getEndpoint(),ossProperties.getAccessId(),ossProperties.getAccessKey());
    }

}
